using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Extraction
{
    /// <summary>
    /// <para>Extract by Attributes</para>
    /// <para>Extracts the cells of a raster based on a logical query.</para>
    /// <para>根据逻辑查询提取栅格的像元。</para>
    /// </summary>    
    [DisplayName("Extract by Attributes")]
    public class ExtractByAttributes : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExtractByAttributes()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input raster</para>
        /// <para>The input raster from which cells will be extracted.</para>
        /// <para>将从中提取像元的输入栅格。</para>
        /// </param>
        /// <param name="_where_clause">
        /// <para>Where clause</para>
        /// <para><xdoc>
        ///   <para>A logical expression that selects a subset of raster cells.</para>
        ///   <para>The Where clause follows the general form of an SQL expression. It can be entered directly, for example, VALUE > 100, if you click the Edit SQL mode button . If in the Edit Clause Mode , you can begin constructing the expression by clicking on the Add Clause Mode button.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>选择栅格像元子集的逻辑表达式。</para>
        ///   <para>Where 子句遵循 SQL 表达式的常规形式。可以直接输入它，例如，VALUE > 100，如果单击 编辑 SQL 模式按钮 。如果在 Edit Clause Mode 中，您可以通过单击 Add Clause Mode 按钮开始构造表达式。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para>The output raster containing the cell values extracted from the input raster.</para>
        /// <para>包含从输入栅格中提取的像元值的输出栅格。</para>
        /// </param>
        public ExtractByAttributes(object _in_raster, object _where_clause, object _out_raster)
        {
            this._in_raster = _in_raster;
            this._where_clause = _where_clause;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Extract by Attributes";

        public override string CallName => "sa.ExtractByAttributes";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _where_clause, _out_raster];

        /// <summary>
        /// <para>Input raster</para>
        /// <para>The input raster from which cells will be extracted.</para>
        /// <para>将从中提取像元的输入栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Where clause</para>
        /// <para><xdoc>
        ///   <para>A logical expression that selects a subset of raster cells.</para>
        ///   <para>The Where clause follows the general form of an SQL expression. It can be entered directly, for example, VALUE > 100, if you click the Edit SQL mode button . If in the Edit Clause Mode , you can begin constructing the expression by clicking on the Add Clause Mode button.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>选择栅格像元子集的逻辑表达式。</para>
        ///   <para>Where 子句遵循 SQL 表达式的常规形式。可以直接输入它，例如，VALUE > 100，如果单击 编辑 SQL 模式按钮 。如果在 Edit Clause Mode 中，您可以通过单击 Add Clause Mode 按钮开始构造表达式。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Where clause")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _where_clause { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para>The output raster containing the cell values extracted from the input raster.</para>
        /// <para>包含从输入栅格中提取的像元值的输出栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        public ExtractByAttributes SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}